<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8" />
    <title>在平安</title>
    <meta name="description" content="中国平安" />
    <meta name="keywords" content="中国平安" />
    <meta content="width=640, target-densitydpi=320, user-scalable=no" name="viewport" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta content="telephone=no" name="format-detection" />

    <link rel="stylesheet" type="text/css" href="../css/base.css">
    <link rel="stylesheet" type="text/css" href="../css/public.css">
    <script src="../js/zepto.min.js" type="text/javascript"></script>
    <script src="../js/zepto-touch.js" type="text/javascript"></script>

    <script src="../js/mobiscroll/js/mobiscroll.zepto.js" type="text/javascript"></script>
    <script src="../js/mobiscroll/js/mobiscroll.core.js" type="text/javascript"></script>
    <script src="../js/mobiscroll/js/mobiscroll.scroller.js" type="text/javascript"></script>
    <script src="../js/mobiscroll/js/mobiscroll.datetime.js" type="text/javascript"></script>
    <script src="../js/mobiscroll/js/mobiscroll.scroller.ios.js" type="text/javascript"></script>
    <script src="../js/mobiscroll/js/mobiscroll.i18n.zh.js" type="text/javascript"></script>
    <link href="../js/mobiscroll/css/mobiscroll.scroller.css" rel="stylesheet" type="text/css" />
    <link href="../js/mobiscroll/css/mobiscroll.scroller.ios.css" rel="stylesheet" type="text/css" />
    <link href="../js/mobiscroll/css/mobiscroll.animation.css" rel="stylesheet" type="text/css" />

    <script src="../js/public.js" type="text/javascript"></script>
    <script src="../js/common/doT.js" type="text/javascript"></script>
    <script src="../js/common/validate.js" type="text/javascript"></script>
    <script src="../js/kpi/kpi-toScore.js" type="text/javascript"></script>
    <script src="../js/iscroll.js" type="text/javascript"></script>
	<style>
	#wrap{position: absolute;width: 100%;height: 100%;overflow:hidden;}
	</style>
</head>

<body>
<div id="wrap">
    <header class="top-bar">
        <div class="top-bar-cont">
            <span class="btn-bar-css btn-bar-back btn-bar-left" onclick="back()"><i></i></span>
            <h1>我的<span id="month">03</span>月汇报<i class="h1-icon"></i></h1>
            <span class="btn-bar-txt btn-txt-state btn-bar-right"><i id="report_status">未提交</i></span>
        </div>
    </header>
    <section>
    	<div class="loading-mask g-mask" id="loading" style="display: none;">
	    	<div class="loading-mask-img"><img src="../images/loading.gif" width="70" height="70"></div>
	    </div>
    	<div id="content" style="position: relative;">
    	<div>
        <div class="kpi-module">
            <h2 class="kpi-h2 row-webkit-box">
                <div class="info-list-cont">关键工作计划</div>
            </h2>
            <div class="kpi-main">
                <div class="score-table score-table-col3">
                    <div class="score-table-header">
                        <ul>
                            <li>关键工作计划</li>
                            <li>权重</li>
                            <li>评分</li>
                        </ul>
                    </div>
                    <div class="score-table-tbody">
                        <ol class="row-info-list" id="keyworkList">
                            <li>
                                <div class="score-table-td"></div>
                                <div class="score-table-td">总评分</div>
                                <div class="score-table-td" id="totalScore"></div>
                            </li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>
		<div id="firstReview" style="display: none">
        	<ul class="row-info-list" id="khbac">
            </ul>
        </div>
        <div class="score-opeate">
            <div class="score-opeate-title">
                <div class="score-opeate-icon">
                    <i></i>
                    <div class="opeate-icon-cont" id="J-StaffNum">
                        ...
                    </div>
                </div>
                <div style="height:190px;-webkit-box-pack:initial;" class="opeate-title-txt"><span class="fn-c-ccc" id="opinionMsg">请您拨动标尺打分</span></div>
            </div>
            <div class="score-opeate-content">
                <div class="staff-main">
                    <div class="staff-btn btn-minus" id="J-BtnMinus"></div>
                    <div class="staff-img">
                        <div class="staff-img-cont" id="J-Staff">
                            <div class="staff-img-move"></div>
                            <div class="staff-img-line"></div>
                        </div>
                        <div class="staff-img-buoy"></div>
                    </div>
                    <div class="staff-btn btn-add" id="J-BtnAdd"></div>
                </div>
            </div>
        </div>
        </div>
        </div>
    </section>
    <footer class="footer-fixed">
        <div class="footer-fixed-cont">
            <div class="footer-fixed-bg"></div>
            <div class="footer-btn">
                <div class="btn-css btn-bg-72cb09" id="save">保存</div>
                <div id="Nosave" style="display: none; background-color: grey;" class="btn-css btn-bg-72cb09">保存</div>
                <div class="btn-css m-l44" id="submit">提交</div>
                <div id="Nosubmit" style="display: none; background-color: gray" class="btn-css m-l44">提交</div>
            </div>
        </div>
    </footer>
</div>
<div class="g-mask" id="maskNode">
    <div class="g-mask-bg"></div>
    <div class="g-mask-layout">
        <article class="g-mask-content">
            <section class="g-mask-cont">
                <p><span id="tis"></span><br/>提交后如需修改，须经主考核人<span id="managername"></span>驳回，确认提交吗？</p>
            </section>
            <footer class="g-mask-cont-btn">
                <div class="btn-css btn-left fn-c-999" id="mask-cancel">放弃</div>
                <div class="btn-css btn-right fn-c-157efb" id="mask-sure">提交</div>
            </footer>
        </article>
    </div>
</div>
<!-- 错误信息层 -->
<div class="g-mask" id="errorMask">
	<div class="g-mask-bg"  id="errorBtncancel"></div>
		<div class="g-mask-layout">
            <article class="g-mask-content">
                <section class="g-mask-cont">
                    <p id="message"></p>
                </section>
            </article>
        </div>
</div>
<script type="template" id="keywork-item-tpl">
    {{~it:val:index}}
    <li class="keywork-item">
        <div class="score-table-td">
            <div class="row-left-icon"><i>{{=index+1}}</i></div>
            <div class="info-list-cont">{{=val.ewg_descr}}</div>
        </div>
        <div class="score-table-td">{{=val.ewg_weight}}%</div>
        <div class="score-table-td">
			{{? val.iscyc=="1"}}
				{{? val.ewg_status=="CO"}}
					{{? val.ewg_status_app=="0"}}
						{{? val.ewg_status_app1!="2"}}
							<input type="text" class="ipt edit-score" data-weight="{{=val.ewg_weight/100}}" placeholder="0~100" maxlength="3" readonly="readonly" data-index="{{=index}}" value="{{=val.ewg_self_rating}}"/>
						{{??}}
							<input type="text" class="ipt edit-score" data-weight="{{=val.ewg_weight/100}}" placeholder="0~100" maxlength="3" onkeyup="countSum()" data-index="{{=index}}" value="{{=val.ewg_self_rating}}"/>
						{{?}}
					{{??}}
						<input type="text" class="ipt edit-score" data-weight="{{=val.ewg_weight/100}}" placeholder="0~100" maxlength="3" onkeyup="countSum()" data-index="{{=index}}" value="{{=val.ewg_self_rating}}"/>
					{{?}}
				{{??}}
					<input type="text" class="ipt edit-score" data-weight="{{=val.ewg_weight/100}}" placeholder="0~100" maxlength="3" onkeyup="countSum()" data-index="{{=index}}" value="{{=val.ewg_self_rating}}"/>
				{{?}}
			{{?}}
        </div>
        <input type="hidden" value="{{=val.ewg_section_id}}"/>
    </li>
    {{~}}
</script>


<script>
    var edit = $("#J-EditContent").find(".edit-row-cont");
    edit.on("tap", function(){
        location.href='gjgzjh2.html';
    })

    var offsetX = -221, i = 1,m=0, staffNum = 3.9;

    $("#J-Staff").on("touchmove", function(event){
        var touch = event.touches[0];
        event.preventDefault();
        if(i===4){
            if(touch.pageX < m ){
                offsetX -= 10;staffNum += 0.1;
            }else{
                offsetX += 10;staffNum -= 0.1;
            }
            if(offsetX>=-101){offsetX = -101;staffNum = 2.7;}
            if(offsetX<=-331){offsetX = -331;staffNum = 5.0;}
            $("#J-StaffNum").text(new Number(staffNum).toFixed(1));
            $(this).find(".staff-img-move").css("left", offsetX);
            i= 1;

            m = touch.pageX;
        }
        i++;
        setOpinionMsg(staffNum);
        //myiscroll.scrollToElement(".score-opeate-content",0);
    });
    $("#J-BtnMinus").on("tap", function(event){
        if(offsetX < -101){
            offsetX += 10;
            staffNum -= 0.1;
        }
        $("#J-StaffNum").text(new Number(staffNum).toFixed(1));
        $("#J-Staff").find(".staff-img-move").css("left",offsetX);
        setOpinionMsg(staffNum);
        //myiscroll.scrollToElement(".score-opeate-content",0);
    });
    $("#J-BtnAdd").on("tap", function(event){
        if(offsetX > -331){
            offsetX -= 10;
            staffNum += 0.1;
        }
        $("#J-StaffNum").text(new Number(staffNum).toFixed(1));
        $("#J-Staff").find(".staff-img-move").css("left",offsetX);
        setOpinionMsg(staffNum);
        //myiscroll.scrollToElement(".score-opeate-content",0);
    });

    init();
</script>

</body>
</html>
